Thread support library (C++0x)
From Cppreference
< cpp
| C++ Standard Library | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
| Thread support library | ||||||||||||
| Template:cpp/thread/sidebar content | ||||||||||||
The standard thread support library provides portable way to construct threads and to manage them.
Contents |
[edit] Thread management
Class thread manages a separate thread.
There are several thread related functions defined in std::this_thread namespace:
| Defined in header
<thread> | ||
| hints the implementation to reschedule execution of threads (function) | |
| returns the thread id of the current thread (function) | |
| stops the execution of the current thread for a specified time duration (function) | |
| stops the execution of the current thread until a specified time point (function) | |
[edit] Mutual exclusion
Several classes are provided that manage mutexes: mutex, recursive_mutex, timed_mutex, recursive_timed_mutex.
Several class templates are provided for generic mutex management: lock_guard, unique_lock.
once_flag| This section is incomplete |
Several helper functions are provided for mutex locking:
| Defined in header
<mutex> | ||||
| tries to lock specified mutexes or locks, returns if at least one is unavailable (function) | |||
| locks specified mutexes/locks, blocks if at least one is unavailable (function) | |||
|
(function) | |||
[edit] Condition variables
| This section is incomplete |
[edit] Futures
| This section is incomplete |